import { ModelServiceStore } from './core';
import { IPSModelObject } from './ipsmodel-object';

/**
 * 模型基础服务对象
 * @export
 * @interface IPSModelService
 */
export interface IPSModelService {
  getStore(): ModelServiceStore;

  getRootModel(): IPSModelObject;

  getRealObjectNode(obj: IModel): IModel;

  /**
   * 从模型文件加载对象
   *
   * @param {IPSModelObject} relatedPSModelObject
   * @param {string} filePath
   * @return {*}  {*}
   */
  getModel(relatedPSModelObject: IPSModelObject, filePath: string): IModel;

  /**
   * 从指定模型中获取指定对象
   *
   * @author chitanda
   * @date 2022-08-10 22:08:20
   * @param {IPSModelObject} relatedPSModelObject
   * @param {string} cls
   * @param {IModel} objNode
   * @param {string} [strTag]
   * @return {*}  {IPSModelObject}
   */
  getPSModel4(relatedPSModelObject: IPSModelObject, cls: string, objNode: IModel, strTag?: string): IPSModelObject;

  /**
   * 从模型数组中获取指定对象
   *
   * @author chitanda
   * @date 2022-08-10 22:08:06
   * @param {IPSModelObject} relatedPSModelObject
   * @param {string} cls
   * @param {IPSModelObject[]} list
   * @param {string} objKey
   * @return {*}  {IPSModelObject}
   */
  getPSModel5(relatedPSModelObject: IPSModelObject, cls: string, list: IPSModelObject[], objKey: string): IPSModelObject;

  /**
   * 根据标识查找子模型
   *
   * @author chitanda
   * @date 2022-10-20 11:10:56
   * @param {IPSModelObject} relatedPSModelObject
   * @param {string} cls
   * @param {IModel} obj
   * @param {string} [strTag]
   * @return {*}  {IPSModelObject}
   */
  getChildPSModelObject(relatedPSModelObject: IPSModelObject, cls: string, obj: IModel, strTag?: string): IPSModelObject;

  /**
   * 根据标识查找父模型
   *
   * @author chitanda
   * @date 2022-10-20 11:10:39
   * @param {IPSModelObject} relatedPSModelObject
   * @param {string} cls
   * @return {*}  {IPSModelObject}
   */
  getParentPSModelObject(relatedPSModelObject: IPSModelObject, cls: string): IPSModelObject;
}
